From 4d0cfc43820526684a4df339b6c58778a2145f08 Mon Sep 17 00:00:00 2001 From: "awilliam@xenbuild.aw" Date: Mon, 6 Mar 2006 09:06:55 -0700 Subject: [PATCH] [IA64] Warnings removal and small cleanups. Signed-off-by: Tristan Gingold --- xen/arch/ia64/linux-xen/smpboot.c | 8 +++---- xen/arch/ia64/xen/dom_fw.c | 23 ++++++++++----------- xen/arch/ia64/xen/domain.c | 5 +++-- xen/arch/ia64/xen/vcpu.c | 6 +++--- xen/arch/ia64/xen/xentime.c | 2 +- xen/include/asm-ia64/dom_fw.h | 2 +- xen/include/asm-ia64/flushtlb.h | 2 ++ xen/include/asm-ia64/linux-xen/asm/system.h | 3 +++ xen/include/asm-ia64/mm.h | 2 ++ 9 files changed, 30 insertions(+), 23 deletions(-) diff --git a/xen/arch/ia64/linux-xen/smpboot.c b/xen/arch/ia64/linux-xen/smpboot.c index a7e5e780c5..d75cd58f96 100644 --- a/xen/arch/ia64/linux-xen/smpboot.c +++ b/xen/arch/ia64/linux-xen/smpboot.c @@ -482,16 +482,14 @@ do_boot_cpu (int sapicid, int cpu) do_rest: task_for_booting_cpu = c_idle.idle; #else - struct domain *idle; struct vcpu *v; - void *stack; v = idle_vcpu[cpu] = alloc_vcpu(idle_vcpu[0]->domain, cpu, cpu); BUG_ON(v == NULL); - printf ("do_boot_cpu: cpu=%d, domain=%p, vcpu=%p\n", cpu, idle, v); + //printf ("do_boot_cpu: cpu=%d, domain=%p, vcpu=%p\n", cpu, idle, v); - task_for_booting_cpu = v; + task_for_booting_cpu = (task_t *)v; /* Set cpu number. */ get_thread_info(v)->cpu = cpu; @@ -522,6 +520,7 @@ do_rest: return 0; } +#ifndef XEN static int __init decay (char *str) { @@ -531,6 +530,7 @@ decay (char *str) } __setup("decay=", decay); +#endif /* * Initialize the logical CPU number to SAPICID mapping diff --git a/xen/arch/ia64/xen/dom_fw.c b/xen/arch/ia64/xen/dom_fw.c index 69a694d577..37df8105b7 100644 --- a/xen/arch/ia64/xen/dom_fw.c +++ b/xen/arch/ia64/xen/dom_fw.c @@ -210,8 +210,8 @@ sal_emulator (long index, unsigned long in1, unsigned long in2, unsigned long in3, unsigned long in4, unsigned long in5, unsigned long in6, unsigned long in7) { - long r9 = 0; - long r10 = 0; + unsigned long r9 = 0; + unsigned long r10 = 0; long r11 = 0; long status; @@ -285,12 +285,11 @@ sal_emulator (long index, unsigned long in1, unsigned long in2, } struct ia64_pal_retval -xen_pal_emulator(unsigned long index, unsigned long in1, - unsigned long in2, unsigned long in3) +xen_pal_emulator(unsigned long index, u64 in1, u64 in2, u64 in3) { - long r9 = 0; - long r10 = 0; - long r11 = 0; + unsigned long r9 = 0; + unsigned long r10 = 0; + unsigned long r11 = 0; long status = -1; if (running_on_sim) return pal_emulator_static(index); @@ -364,7 +363,7 @@ xen_pal_emulator(unsigned long index, unsigned long in1, &r10); break; case PAL_REGISTER_INFO: - status = ia64_pal_register_info(in1,&r9,&r10); + status = ia64_pal_register_info(in1, &r9, &r10); break; case PAL_CACHE_FLUSH: /* FIXME */ @@ -608,13 +607,13 @@ dom_fw_fake_acpi(struct fake_acpi_tables *tables) /* Trivial namespace, avoids ACPI CA complaints */ tables->aml[0] = 0x10; /* Scope */ tables->aml[1] = 0x12; /* length/offset to next object */ - strncpy(&tables->aml[2], "_SB_", 4); + strncpy((char *)&tables->aml[2], "_SB_", 4); /* The processor object isn't absolutely necessary, revist for SMP */ tables->aml[6] = 0x5b; /* processor object */ tables->aml[7] = 0x83; tables->aml[8] = 0x0b; /* next */ - strncpy(&tables->aml[9], "CPU0", 4); + strncpy((char *)&tables->aml[9], "CPU0", 4); dsdt->checksum = generate_acpi_checksum(dsdt, dsdt->length); @@ -801,8 +800,8 @@ dom_fw_init (struct domain *d, char *args, int arglen, char *fw_mem, int fw_mem_ sal_systab->sal_rev_major = 0; sal_systab->entry_count = 1; - strcpy(sal_systab->oem_id, "Xen/ia64"); - strcpy(sal_systab->product_id, "Xen/ia64"); + strcpy((char *)sal_systab->oem_id, "Xen/ia64"); + strcpy((char *)sal_systab->product_id, "Xen/ia64"); /* fill in an entry point: */ sal_ed->type = SAL_DESC_ENTRY_POINT; diff --git a/xen/arch/ia64/xen/domain.c b/xen/arch/ia64/xen/domain.c index 835133b0f0..db67135383 100644 --- a/xen/arch/ia64/xen/domain.c +++ b/xen/arch/ia64/xen/domain.c @@ -351,8 +351,9 @@ void new_thread(struct vcpu *v, regs->cr_ipsr = 0x501008826008; /* Need to be expanded as macro */ } else { regs->cr_ipsr = ia64_getreg(_IA64_REG_PSR) - | IA64_PSR_BITS_TO_SET | IA64_PSR_BN - & ~(IA64_PSR_BITS_TO_CLEAR | IA64_PSR_RI | IA64_PSR_IS); + | IA64_PSR_BITS_TO_SET | IA64_PSR_BN; + regs->cr_ipsr &= ~(IA64_PSR_BITS_TO_CLEAR + | IA64_PSR_RI | IA64_PSR_IS); regs->cr_ipsr |= 2UL << IA64_PSR_CPL0_BIT; // domain runs at PL2 } regs->cr_iip = start_pc; diff --git a/xen/arch/ia64/xen/vcpu.c b/xen/arch/ia64/xen/vcpu.c index 027e54f3ca..a236e2dd2a 100644 --- a/xen/arch/ia64/xen/vcpu.c +++ b/xen/arch/ia64/xen/vcpu.c @@ -945,8 +945,8 @@ IA64FAULT vcpu_set_eoi(VCPU *vcpu, UINT64 val) p = &PSCBX(vcpu,insvc[3]); for (i = 3; (i >= 0) && !(bits = *p); i--, p--); if (i < 0) { - printf("Trying to EOI interrupt when none are in-service.\r\n"); - return; + printf("Trying to EOI interrupt when none are in-service.\n"); + return IA64_NO_FAULT; } bitnum = ia64_fls(bits); vec = bitnum + (i*64); @@ -957,7 +957,7 @@ IA64FAULT vcpu_set_eoi(VCPU *vcpu, UINT64 val) if (PSCB(vcpu,interrupt_delivery_enabled)) { // but only if enabled... // worry about this later... Linux only calls eoi // with interrupts disabled - printf("Trying to EOI interrupt with interrupts enabled\r\n"); + printf("Trying to EOI interrupt with interrupts enabled\n"); } if (vcpu_check_pending_interrupts(vcpu) != SPURIOUS_VECTOR) PSCB(vcpu,pending_interruption) = 1; diff --git a/xen/arch/ia64/xen/xentime.c b/xen/arch/ia64/xen/xentime.c index 45ffcebff1..79fe235633 100644 --- a/xen/arch/ia64/xen/xentime.c +++ b/xen/arch/ia64/xen/xentime.c @@ -141,7 +141,7 @@ xen_timer_interrupt (int irq, void *dev_id, struct pt_regs *regs) new_itm = local_cpu_data->itm_next; if (!VMX_DOMAIN(current) && !time_after(ia64_get_itc(), new_itm)) - return; + return IRQ_HANDLED; if (VMX_DOMAIN(current)) vcpu_wake(current); diff --git a/xen/include/asm-ia64/dom_fw.h b/xen/include/asm-ia64/dom_fw.h index fcf80d0f22..1c5f3d09aa 100644 --- a/xen/include/asm-ia64/dom_fw.h +++ b/xen/include/asm-ia64/dom_fw.h @@ -119,7 +119,7 @@ extern unsigned long dom_fw_setup(struct domain *, char *, int); #define FW_HYPERCALL_EFI_GET_NEXT_HIGH_MONO_COUNT_PADDR FW_HYPERCALL_PADDR(FW_HYPERCALL_EFI_GET_NEXT_HIGH_MONO_COUNT_INDEX) #define FW_HYPERCALL_EFI_RESET_SYSTEM_PADDR FW_HYPERCALL_PADDR(FW_HYPERCALL_EFI_RESET_SYSTEM_INDEX) -extern struct ia64_pal_retval xen_pal_emulator(UINT64,UINT64,UINT64,UINT64); +extern struct ia64_pal_retval xen_pal_emulator(UINT64, u64, u64, u64); extern struct sal_ret_values sal_emulator (long index, unsigned long in1, unsigned long in2, unsigned long in3, unsigned long in4, unsigned long in5, unsigned long in6, unsigned long in7); extern struct ia64_pal_retval pal_emulator_static (unsigned long); diff --git a/xen/include/asm-ia64/flushtlb.h b/xen/include/asm-ia64/flushtlb.h index 2f5ecead31..d0c3286448 100644 --- a/xen/include/asm-ia64/flushtlb.h +++ b/xen/include/asm-ia64/flushtlb.h @@ -1,6 +1,8 @@ #ifndef __FLUSHTLB_H__ #define __FLUSHTLB_H__ +#include + /* The current time as shown by the virtual TLB clock. */ extern u32 tlbflush_clock; diff --git a/xen/include/asm-ia64/linux-xen/asm/system.h b/xen/include/asm-ia64/linux-xen/asm/system.h index 1f53552e48..ae5a8ae398 100644 --- a/xen/include/asm-ia64/linux-xen/asm/system.h +++ b/xen/include/asm-ia64/linux-xen/asm/system.h @@ -290,6 +290,9 @@ void cpu_idle_wait(void); #ifdef XEN #include +#ifndef __ASSEMBLY__ +struct resource; +#endif #endif #endif /* _ASM_IA64_SYSTEM_H */ diff --git a/xen/include/asm-ia64/mm.h b/xen/include/asm-ia64/mm.h index 03c1737cbc..a87856149e 100644 --- a/xen/include/asm-ia64/mm.h +++ b/xen/include/asm-ia64/mm.h @@ -462,4 +462,6 @@ extern unsigned long lookup_domain_mpa(struct domain *d, unsigned long mpaddr); /* Arch-specific portion of memory_op hypercall. */ #define arch_memory_op(op, arg) (-ENOSYS) +extern void assign_domain_page(struct domain *d, unsigned long mpaddr, + unsigned long physaddr); #endif /* __ASM_IA64_MM_H__ */ -- 2.30.2